#include "conn.hpp"

int main(){
    StringUtil::UrlParam params;
    MYSQL* conn;
    Init(params,conn); 

    //根据业务需要进行计算
    string title = params["title"];
    string comment = params["comment"];
    string user = params["user"];
    stringstream ss;
    string output;

    Action::ActionNews(conn,output,title,comment,user);
    cout << "Set-Cookie: cookie_title=" << title << "\n";
    cout << "Set-Cookie: cookie_comment=" << comment << "\n"; 

    ss << output;
    HttpResponse(ss.str());
    return 0;
}
